package Demo;

import java.io.File;
import java.io.IOException;

public class demo04 {
    public static void main(String[] args) throws IOException {
        File file = new File("D:/代码练习文件/新建文件夹");
        //File file = new File("../../../代码练习文件");
        //File file = new File("./代码练习文件");
        System.out.println(file.getParent());
        System.out.println(file.getName());
        System.out.println(file.getPath());
        System.out.println(file.getAbsolutePath());
        System.out.println(file.getCanonicalPath());

        System.out.println(file.isFile());
        System.out.println(file.isDirectory());
        System.out.println(file.exists());

    }
}
